Fixed an updating problem
This commit is contained in:
parent
87eac6e5aa
commit
b12b7fadc4
|
@ -71,7 +71,8 @@ InsertPanel::InsertPanel (
|
|||
void InsertPanel::update (
|
||||
XmlDoc *docParameter,
|
||||
const wxString& parentParameter,
|
||||
const wxString& grandparentParameter )
|
||||
const wxString& grandparentParameter,
|
||||
bool forced )
|
||||
{
|
||||
doc = docParameter;
|
||||
parent = parentParameter;
|
||||
|
@ -89,7 +90,7 @@ void InsertPanel::update (
|
|||
return;
|
||||
}
|
||||
|
||||
bool refreshEntities = false;
|
||||
bool refreshEntities = forced;
|
||||
if ( doc != lastDoc )
|
||||
{
|
||||
refreshEntities = true;
|
||||
|
@ -109,7 +110,7 @@ void InsertPanel::update (
|
|||
return;
|
||||
}
|
||||
|
||||
if ( parent == lastParent && !list->IsEmpty() )
|
||||
if ( parent == lastParent && !refreshEntities )
|
||||
return;
|
||||
lastParent = parent;
|
||||
|
||||
|
|
|
@ -41,7 +41,8 @@ class InsertPanel : public wxPanel
|
|||
void update (
|
||||
XmlDoc *doc,
|
||||
const wxString& parent = wxEmptyString,
|
||||
const wxString& grandparent = wxEmptyString );
|
||||
const wxString& grandparent = wxEmptyString,
|
||||
bool forced = false );
|
||||
void OnEnter ( wxCommandEvent& event );
|
||||
void OnDoubleClick ( wxCommandEvent& event );
|
||||
void OnListSelection ( wxCommandEvent& event );
|
||||
|
|
|
@ -6018,9 +6018,9 @@ void MyFrame::OnPromptGenerated ( wxNotifyEvent &event )
|
|||
{
|
||||
XmlDoc *doc = this->getActiveDocument();
|
||||
locationPanel->update ( doc, lastParent );
|
||||
insertChildPanel->update ( doc, lastParent );
|
||||
insertSiblingPanel->update ( doc, lastParent );
|
||||
insertEntityPanel->update ( doc );
|
||||
insertChildPanel->update ( doc, lastParent, wxEmptyString, true );
|
||||
insertSiblingPanel->update ( doc, lastParent, wxEmptyString, true );
|
||||
insertEntityPanel->update ( doc, wxEmptyString, wxEmptyString, true );
|
||||
}
|
||||
|
||||
wxString MyFrame::getAuxPath ( const wxString& fileName )
|
||||
|
|
Loading…
Reference in New Issue