Browse Source

Implement HardRedraw for eeschema and libedit.

pull/13/head
Jeff Young 7 years ago
parent
commit
254e9f4a7e
  1. 9
      eeschema/libedit/lib_edit_frame.cpp
  2. 5
      eeschema/libedit/lib_edit_frame.h
  3. 7
      eeschema/sch_edit_frame.cpp
  4. 5
      eeschema/sch_edit_frame.h

9
eeschema/libedit/lib_edit_frame.cpp

@ -1720,11 +1720,13 @@ void LIB_EDIT_FRAME::ShowChangedLanguage()
UpdateMsgPanel();
}
void LIB_EDIT_FRAME::SetScreen( BASE_SCREEN* aScreen )
{
EDA_DRAW_FRAME::SetScreen( aScreen );
}
void LIB_EDIT_FRAME::RebuildView()
{
KIGFX::SCH_VIEW* view = GetCanvas()->GetView();
@ -1742,6 +1744,13 @@ void LIB_EDIT_FRAME::RebuildView()
GetCanvas()->Refresh();
}
void LIB_EDIT_FRAME::HardRedraw()
{
RebuildView();
}
const BOX2I LIB_EDIT_FRAME::GetDocumentExtents() const
{
LIB_PART* part = GetCurPart();

5
eeschema/libedit/lib_edit_frame.h

@ -715,6 +715,11 @@ public:
void RebuildView();
/**
* Rebuild the GAL and redraw the screen. Call when something went wrong.
*/
void HardRedraw() override;
/**
* Checks all draw objects of part to see if they are with block.
*

7
eeschema/sch_edit_frame.cpp

@ -592,6 +592,13 @@ void SCH_EDIT_FRAME::SetCurrentSheet( const SCH_SHEET_PATH& aSheet )
}
void SCH_EDIT_FRAME::HardRedraw()
{
static_cast<SCH_DRAW_PANEL*>( m_canvas )->DisplaySheet( m_CurrentSheet->LastScreen() );
GetCanvas()->Refresh();
}
void SCH_EDIT_FRAME::SetUndoItem( const SCH_ITEM* aItem )
{
// if aItem != NULL, delete a previous m_undoItem, if exists

5
eeschema/sch_edit_frame.h

@ -626,6 +626,11 @@ public:
void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
/**
* Rebuild the GAL and redraw the screen. Call when something went wrong.
*/
void HardRedraw() override;
/**
* Draw the current sheet on the display.
*/

Loading…
Cancel
Save