Implement HardRedraw for eeschema and libedit.

This commit is contained in:
Jeff Young 2018-10-17 12:14:09 +01:00
parent e9a80a5d7f
commit 254e9f4a7e
4 changed files with 26 additions and 0 deletions

View File

@ -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();

View File

@ -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.
*

View File

@ -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

View File

@ -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.
*/