| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2014 Eran Ifrah |
| 5 |
// file name : FrameCanvas.cpp |
| 6 |
// |
| 7 |
// ------------------------------------------------------------------------- |
| 8 |
// A |
| 9 |
// _____ _ _ _ _ |
| 10 |
// / __ \ | | | | (_) | |
| 11 |
// | / \/ ___ __| | ___| | _| |_ ___ |
| 12 |
// | | / _ \ / _ |/ _ \ | | | __/ _ ) |
| 13 |
// | \__/\ (_) | (_| | __/ |___| | || __/ |
| 14 |
// \____/\___/ \__,_|\___\_____/_|\__\___| |
| 15 |
// |
| 16 |
// F i l e |
| 17 |
// |
| 18 |
// This program is free software; you can redistribute it and/or modify |
| 19 |
// it under the terms of the GNU General Public License as published by |
| 20 |
// the Free Software Foundation; either version 2 of the License, or |
| 21 |
// (at your option) any later version. |
| 22 |
// |
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
////////////////////////////////////////////////////////////////////////////// |
| 25 |
|
| 26 |
#include "CreateForeignKey.h" |
| 27 |
|
| 28 |
#include "FrameCanvas.h" |
| 29 |
#include "ErdTable.h" |
| 30 |
#include "ErdView.h" |
| 31 |
|
| 32 |
#include <wx/xrc/xmlres.h> |
| 33 |
|
| 34 |
FrameCanvas::FrameCanvas(wxSFDiagramManager* manager,IDbAdapter* dbAdapter, wxPanel* parentPanel, wxWindowID id): |
| 35 |
wxSFShapeCanvas(manager, parentPanel, id, wxDefaultPosition, wxDefaultSize, wxHSCROLL | wxVSCROLL | wxSTATIC_BORDER) { |
| 36 |
m_pParentPanel = (ErdPanel*) parentPanel; |
| 37 |
|
| 38 |
m_pDbAdapter = dbAdapter; |
| 39 |
|
| 40 |
GetHistoryManager().SetMode(wxSFCanvasHistory::histUSE_SERIALIZATION); |
| 41 |
GetHistoryManager().SetHistoryDepth(20); |
| 42 |
|
| 43 |
AddStyle(sfsGRADIENT_BACKGROUND); |
| 44 |
SetGradientFrom( wxColour(230, 230, 230) ); |
| 45 |
SetGradientTo( wxColour(255, 255, 255) ); |
| 46 |
|
| 47 |
SetHoverColour( wxColour(200, 200, 200) ); |
| 48 |
|
| 49 |
AddStyle(sfsGRID_USE); |
| 50 |
AddStyle(sfsGRID_SHOW); |
| 51 |
SetGridLineMult( 10 ); |
| 52 |
#ifdef __WXMSW__ |
| 53 |
SetGridStyle( wxDOT ); |
| 54 |
#else |
| 55 |
SetGridStyle( wxSHORT_DASH ); |
| 56 |
#endif |
| 57 |
|
| 58 |
AddStyle(sfsPROCESS_MOUSEWHEEL); |
| 59 |
SetMinScale(0.2); |
| 60 |
SetMaxScale(2); |
| 61 |
|
| 62 |
GetDiagramManager()->ClearAcceptedShapes(); |
| 63 |
GetDiagramManager()->AcceptShape(wxT("All")); |
| 64 |
|
| 65 |
SaveCanvasState(); |
| 66 |
} |
| 67 |
|
| 68 |
FrameCanvas::~FrameCanvas() { |
| 69 |
} |
| 70 |
|
| 71 |
void FrameCanvas::UpdateERD() { |
| 72 |
ShapeList lstShapes; |
| 73 |
GetDiagramManager()->GetShapes( CLASSINFO(ErdTable), lstShapes ); |
| 74 |
for( ShapeList::iterator it = lstShapes.begin(); it != lstShapes.end(); ++it ) { |
| 75 |
((ErdTable*)*it)->UpdateColumns(); |
| 76 |
} |
| 77 |
|
| 78 |
lstShapes.Clear(); |
| 79 |
GetDiagramManager()->GetShapes( CLASSINFO(ErdView), lstShapes ); |
| 80 |
for( ShapeList::iterator it = lstShapes.begin(); it != lstShapes.end(); ++it ) { |
| 81 |
((ErdView*)*it)->UpdateView(); |
| 82 |
} |
| 83 |
|
| 84 |
UpdateVirtualSize(); |
| 85 |
Refresh( false ); |
| 86 |
} |
| 87 |
|
| 88 |
void FrameCanvas::OnConnectionFinished(wxSFLineShape* connection) { |
| 89 |
m_pParentPanel->SetToolMode(ErdPanel::modeDESIGN); |
| 90 |
|
| 91 |
return; |
| 92 |
} |
| 93 |
|
| 94 |
void FrameCanvas::OnLeftDown(wxMouseEvent& event) { |
| 95 |
wxSFShapeBase* pShape = NULL; |
| 96 |
|
| 97 |
switch(m_pParentPanel->GetToolMode()) { |
| 98 |
|
| 99 |
case ErdPanel::modeTABLE: { |
| 100 |
pShape = GetDiagramManager()->AddShape(new ErdTable(), NULL, event.GetPosition(), sfINITIALIZE, sfDONT_SAVE_STATE); |
| 101 |
if (pShape) { |
| 102 |
pShape->AcceptConnection(wxT("All")); |
| 103 |
pShape->AcceptSrcNeighbour(wxT("All")); |
| 104 |
pShape->AcceptTrgNeighbour(wxT("All")); |
| 105 |
|
| 106 |
Table* tab = new Table(); |
| 107 |
tab->SetName(wxT("NewTable")); |
| 108 |
pShape->SetUserData(tab); |
| 109 |
|
| 110 |
((ErdTable*)pShape)->UpdateColumns(); |
| 111 |
pShape->Refresh(); |
| 112 |
|
| 113 |
SaveCanvasState(); |
| 114 |
} |
| 115 |
} |
| 116 |
break; |
| 117 |
case ErdPanel::modeLine: { |
| 118 |
if (GetMode() == modeREADY) { |
| 119 |
ErdTable* pTab = wxDynamicCast(GetShapeUnderCursor()->GetGrandParentShape(), ErdTable); |
| 120 |
if (pTab){ |
| 121 |
wxSFTextShape* pText = wxDynamicCast(GetShapeUnderCursor(),wxSFTextShape); |
| 122 |
if (pText) { |
| 123 |
m_srcCol = pText->GetText().substr(3); |
| 124 |
} else m_srcCol = wxT(""); |
| 125 |
StartInteractiveConnection(CLASSINFO(wxSFOrthoLineShape), event.GetPosition()); |
| 126 |
} |
| 127 |
} else wxSFShapeCanvas::OnLeftDown(event); |
| 128 |
} |
| 129 |
break; |
| 130 |
|
| 131 |
case ErdPanel::modeVIEW: { |
| 132 |
pShape = GetDiagramManager()->AddShape(new ErdView(), NULL, event.GetPosition(), sfINITIALIZE, sfDONT_SAVE_STATE); |
| 133 |
if (pShape) { |
| 134 |
pShape->AcceptConnection(wxT("All")); |
| 135 |
pShape->AcceptSrcNeighbour(wxT("All")); |
| 136 |
pShape->AcceptTrgNeighbour(wxT("All")); |
| 137 |
|
| 138 |
View* view = new View(); |
| 139 |
view->SetName(_("New view")); |
| 140 |
view->SetSelect(wxT("SELECT * FROM table")); |
| 141 |
pShape->SetUserData(view); |
| 142 |
|
| 143 |
((ErdView*)pShape)->UpdateView(); |
| 144 |
pShape->Refresh(); |
| 145 |
|
| 146 |
SaveCanvasState(); |
| 147 |
} |
| 148 |
} |
| 149 |
break; |
| 150 |
|
| 151 |
default: |
| 152 |
|
| 153 |
// do default actions |
| 154 |
wxSFShapeCanvas::OnLeftDown(event); |
| 155 |
} |
| 156 |
|
| 157 |
if( pShape ) { |
| 158 |
if(!event.ControlDown()) { |
| 159 |
m_pParentPanel->SetToolMode(ErdPanel::modeDESIGN); |
| 160 |
} |
| 161 |
} |
| 162 |
|
| 163 |
} |
| 164 |
void FrameCanvas::OnRightDown(wxMouseEvent& event) { |
| 165 |
|
| 166 |
wxSFShapeCanvas::OnRightDown(event); |
| 167 |
|
| 168 |
m_mousePos = event.GetPosition(); |
| 169 |
|
| 170 |
wxMenu mnu; |
| 171 |
mnu.Connect(wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)&FrameCanvas::OnPopupClick, NULL, this); |
| 172 |
|
| 173 |
mnu.Append(XRCID("IDR_POPUP_COPY"), _("Copy"))->Enable(CanCopy()); |
| 174 |
mnu.Append(XRCID("IDR_POPUP_CUT"), _("Cut"))->Enable(CanCut()); |
| 175 |
mnu.Append(XRCID("IDR_POPUP_PASTE"), _("Paste"))->Enable(CanPaste()); |
| 176 |
mnu.AppendSeparator(); |
| 177 |
|
| 178 |
mnu.Append(XRCID("IDR_POPUP_NEW_TABLE"), _("Add new ERD table")); |
| 179 |
mnu.Append(XRCID("IDR_POPUP_NEW_VIEW"), _("Add new ERD view")); |
| 180 |
mnu.AppendSeparator(); |
| 181 |
|
| 182 |
mnu.Append(XRCID("IDR_POPUP_FULL_SQL"), _("Copy diagram SQL to the clipboard")); |
| 183 |
|
| 184 |
m_pSelectedShape = GetShapeUnderCursor(); |
| 185 |
if (m_pSelectedShape) { |
| 186 |
|
| 187 |
ErdTable* table = wxDynamicCast(m_pSelectedShape->GetGrandParentShape(), ErdTable); |
| 188 |
if (table) { |
| 189 |
//mnu.AppendSeparator(); |
| 190 |
//mnu.Append(XRCID("IDR_POPUP_MI1"), _("Add column to table")); |
| 191 |
mnu.AppendSeparator(); |
| 192 |
mnu.Append(XRCID("IDR_POPUP_NEW_KEY"), _("Create foreign key for table")); |
| 193 |
mnu.Append(XRCID("IDR_POPUP_MI3"), _("Create view for table")); |
| 194 |
mnu.AppendSeparator(); |
| 195 |
mnu.Append(XRCID("IDR_POPUP_MI2"), _("Copy table SQL to the clipboard")); |
| 196 |
|
| 197 |
} |
| 198 |
} |
| 199 |
|
| 200 |
PopupMenu(&mnu); |
| 201 |
} |
| 202 |
|
| 203 |
|
| 204 |
void FrameCanvas::OnKeyDown(wxKeyEvent& event) { |
| 205 |
wxSFShapeCanvas::OnKeyDown(event); |
| 206 |
event.Skip(); |
| 207 |
} |
| 208 |
|
| 209 |
void FrameCanvas::OnPopupClick(wxCommandEvent &evt) { |
| 210 |
//void *data=static_cast<wxMenu *>(evt.GetEventObject())->GetClientData(); |
| 211 |
if (evt.GetId() == XRCID("IDR_POPUP_MI1")) { |
| 212 |
ErdTable* table = wxDynamicCast(m_pSelectedShape->GetGrandParentShape(), ErdTable); |
| 213 |
if (table) { |
| 214 |
table->AddColumn(_("newcol"),m_pDbAdapter->GetDbTypeByUniversalName(IDbType::dbtTYPE_INT)); |
| 215 |
table->UpdateColumns(); |
| 216 |
table->Refresh(); |
| 217 |
SaveCanvasState(); |
| 218 |
} |
| 219 |
}else if (evt.GetId() == XRCID("IDR_POPUP_MI2")) { |
| 220 |
bool dropTable = ( wxMessageBox( _("Add drop table statement?"),_("SQL export"),wxYES_NO ) == wxYES ); |
| 221 |
if (wxTheClipboard->Open()) { |
| 222 |
ErdTable* table = wxDynamicCast(m_pSelectedShape->GetGrandParentShape(), ErdTable); |
| 223 |
if (table) { |
| 224 |
wxTheClipboard->SetData(new wxTextDataObject(m_pDbAdapter->GetCreateTableSql(table->GetTable(), dropTable))); |
| 225 |
} |
| 226 |
wxTheClipboard->Close(); |
| 227 |
wxMessageBox( _("SQL command has been copied to the clipboard."), _("SQL export"), wxICON_INFORMATION | wxOK ); |
| 228 |
} |
| 229 |
}else if (evt.GetId() == XRCID("IDR_POPUP_MI3")) { |
| 230 |
ErdTable* table = wxDynamicCast(m_pSelectedShape->GetGrandParentShape(), ErdTable); |
| 231 |
if (table) { |
| 232 |
Table* pTab = table->GetTable(); |
| 233 |
wxPoint point(round(table->GetAbsolutePosition().x), round(table->GetAbsolutePosition().y)); |
| 234 |
point.x = table->GetRectSize().x + 10; |
| 235 |
ErdView* pView = (ErdView*) GetDiagramManager()->AddShape(new ErdView(), NULL, point, sfINITIALIZE, sfDONT_SAVE_STATE); |
| 236 |
if (pView) { |
| 237 |
View* view = new View(); |
| 238 |
view->SetName(pTab->GetName()+wxT("VW")); |
| 239 |
view->SetParentName(pTab->GetParentName()); |
| 240 |
view->SetSelect(m_pDbAdapter->GetDefaultSelect(pTab->GetParentName(),pTab->GetName())); |
| 241 |
pView->SetUserData(view); |
| 242 |
pView->UpdateView(); |
| 243 |
pView->Refresh(); |
| 244 |
SaveCanvasState(); |
| 245 |
} |
| 246 |
} |
| 247 |
}else if (evt.GetId() == XRCID("IDR_POPUP_COPY")){ |
| 248 |
Copy(); |
| 249 |
}else if (evt.GetId() == XRCID("IDR_POPUP_CUT")){ |
| 250 |
Cut(); |
| 251 |
}else if (evt.GetId() == XRCID("IDR_POPUP_PASTE")){ |
| 252 |
Paste(); |
| 253 |
UpdateERD(); |
| 254 |
}else if (evt.GetId() == XRCID("IDR_POPUP_NEW_TABLE")){ |
| 255 |
wxSFShapeBase* pShape = GetDiagramManager()->AddShape(new ErdTable(), NULL, m_mousePos, sfINITIALIZE, sfDONT_SAVE_STATE); |
| 256 |
//pShape = GetDiagramManager()->AddShape(CLASSINFO(wxSFRoundRectShape), event.GetPosition(), sfDONT_SAVE_STATE); |
| 257 |
if (pShape) { |
| 258 |
pShape->AcceptConnection(wxT("All")); |
| 259 |
pShape->AcceptSrcNeighbour(wxT("All")); |
| 260 |
pShape->AcceptTrgNeighbour(wxT("All")); |
| 261 |
|
| 262 |
Table* tab = new Table(); |
| 263 |
tab->SetName(wxT("NewTable")); |
| 264 |
pShape->SetUserData(tab); |
| 265 |
|
| 266 |
((ErdTable*)pShape)->UpdateColumns(); |
| 267 |
pShape->Refresh(); |
| 268 |
|
| 269 |
SaveCanvasState(); |
| 270 |
} |
| 271 |
}else if (evt.GetId() == XRCID("IDR_POPUP_NEW_VIEW")){ |
| 272 |
wxSFShapeBase* pShape = GetDiagramManager()->AddShape(new ErdView(), NULL, m_mousePos, sfINITIALIZE, sfDONT_SAVE_STATE); |
| 273 |
if (pShape) { |
| 274 |
pShape->AcceptConnection(wxT("All")); |
| 275 |
pShape->AcceptSrcNeighbour(wxT("All")); |
| 276 |
pShape->AcceptTrgNeighbour(wxT("All")); |
| 277 |
|
| 278 |
View* view = new View(); |
| 279 |
view->SetName(wxT("New view")); |
| 280 |
view->SetSelect(wxT("SELECT * FROM table")); |
| 281 |
pShape->SetUserData(view); |
| 282 |
|
| 283 |
((ErdView*)pShape)->UpdateView(); |
| 284 |
pShape->Refresh(); |
| 285 |
|
| 286 |
SaveCanvasState(); |
| 287 |
} |
| 288 |
|
| 289 |
}else if (evt.GetId() == XRCID("IDR_POPUP_NEW_KEY")){ |
| 290 |
if (GetMode() == modeREADY) { |
| 291 |
wxSFTextShape* pText = wxDynamicCast(m_pSelectedShape,wxSFTextShape); |
| 292 |
if (pText) { |
| 293 |
m_srcCol = pText->GetText().substr(3); |
| 294 |
} else m_srcCol = wxT(""); |
| 295 |
StartInteractiveConnection(CLASSINFO(wxSFOrthoLineShape), m_mousePos); |
| 296 |
} |
| 297 |
}else if (evt.GetId() == XRCID("IDR_POPUP_FULL_SQL")) { |
| 298 |
if (wxTheClipboard->Open()) { |
| 299 |
wxTheClipboard->SetData(new wxTextDataObject(GetSqlScript())); |
| 300 |
wxTheClipboard->Close(); |
| 301 |
wxMessageBox( _("SQL command has been copied to the clipboard."), _("SQL export"), wxICON_INFORMATION | wxOK ); |
| 302 |
} |
| 303 |
} |
| 304 |
} |
| 305 |
|
| 306 |
void FrameCanvas::OnLeftDoubleClick(wxMouseEvent& event) { |
| 307 |
wxSFShapeBase* sp = GetShapeUnderCursor(); |
| 308 |
if (sp) { |
| 309 |
ErdTable* table = wxDynamicCast(sp->GetGrandParentShape(),ErdTable); |
| 310 |
if (table) { |
| 311 |
if (table->GetTable() ) { |
| 312 |
TableSettings settingDialog(this, m_pDbAdapter, table->GetTable(), (wxSFDiagramManager*)table->GetParentManager()); |
| 313 |
settingDialog.ShowModal(); |
| 314 |
table->UpdateColumns(); |
| 315 |
Refresh(false); |
| 316 |
SaveCanvasState(); |
| 317 |
} |
| 318 |
} |
| 319 |
ErdView* view = wxDynamicCast(sp->GetGrandParentShape(), ErdView); |
| 320 |
if (view) { |
| 321 |
if (view->GetView()) { |
| 322 |
ViewSettings settingDialog(this,m_pDbAdapter); |
| 323 |
settingDialog.SetView(view->GetView(),(wxSFDiagramManager*) view->GetParentManager() ); |
| 324 |
settingDialog.ShowModal(); |
| 325 |
view->UpdateView(); |
| 326 |
Refresh(false); |
| 327 |
SaveCanvasState(); |
| 328 |
} |
| 329 |
} |
| 330 |
} |
| 331 |
wxSFShapeCanvas::OnLeftDoubleClick(event); |
| 332 |
} |
| 333 |
|
| 334 |
void FrameCanvas::OnDrop(wxCoord x, wxCoord y, wxDragResult def, const ShapeList& dropped) { |
| 335 |
ShapeList::compatibility_iterator node = dropped.GetFirst(); |
| 336 |
dndTableShape* dndTab = NULL; |
| 337 |
wxSFShapeBase* pShape = NULL; |
| 338 |
while( node ) { |
| 339 |
dndTab = wxDynamicCast(node->GetData(),dndTableShape); |
| 340 |
node = node->GetNext(); |
| 341 |
} |
| 342 |
|
| 343 |
if (dndTab) { |
| 344 |
if (dndTab->GetUserData()->IsKindOf(CLASSINFO(Table))) { |
| 345 |
m_pDbAdapter->ConvertTable((Table*) dndTab->GetUserData()); |
| 346 |
pShape = GetDiagramManager()->AddShape(new ErdTable((Table* ) dndTab->GetUserData()), NULL, wxPoint( x,y), sfINITIALIZE, sfDONT_SAVE_STATE); |
| 347 |
} |
| 348 |
if (dndTab->GetUserData()->IsKindOf(CLASSINFO(View))) { |
| 349 |
pShape = GetDiagramManager()->AddShape(new ErdView((View* ) dndTab->GetUserData()), NULL, wxPoint( x,y), sfINITIALIZE, sfDONT_SAVE_STATE); |
| 350 |
} |
| 351 |
|
| 352 |
if (pShape) { |
| 353 |
pShape->AcceptConnection(wxT("All")); |
| 354 |
pShape->AcceptSrcNeighbour(wxT("All")); |
| 355 |
pShape->AcceptTrgNeighbour(wxT("All")); |
| 356 |
//pShape->Update(); |
| 357 |
|
| 358 |
SaveCanvasState(); |
| 359 |
} |
| 360 |
|
| 361 |
dndTab->SetUserData(NULL); |
| 362 |
GetDiagramManager()->RemoveShape(dndTab); |
| 363 |
} else { |
| 364 |
SaveCanvasState(); |
| 365 |
} |
| 366 |
|
| 367 |
UpdateERD(); |
| 368 |
} |
| 369 |
|
| 370 |
wxString FrameCanvas::GetSqlScript() { |
| 371 |
wxString retStr = wxT(""); |
| 372 |
|
| 373 |
ShapeList lstShapes; |
| 374 |
GetDiagramManager()->GetShapes( CLASSINFO(ErdTable), lstShapes ); |
| 375 |
ShapeList::compatibility_iterator node = lstShapes.GetFirst(); |
| 376 |
while( node ) { |
| 377 |
ErdTable* tab = wxDynamicCast(node->GetData(),ErdTable); |
| 378 |
if (tab) { |
| 379 |
retStr.append(m_pDbAdapter->GetCreateTableSql(tab->GetTable(),true)); |
| 380 |
} |
| 381 |
node = node->GetNext(); |
| 382 |
} |
| 383 |
lstShapes.Clear(); |
| 384 |
GetDiagramManager()->GetShapes( CLASSINFO(ErdView), lstShapes ); |
| 385 |
node = lstShapes.GetFirst(); |
| 386 |
while( node ) { |
| 387 |
ErdView* view = wxDynamicCast(node->GetData(),ErdView); |
| 388 |
if (view) { |
| 389 |
retStr.append(m_pDbAdapter->GetCreateViewSql(view->GetView(),true)); |
| 390 |
} |
| 391 |
node = node->GetNext(); |
| 392 |
} |
| 393 |
lstShapes.Clear(); |
| 394 |
GetDiagramManager()->GetShapes( CLASSINFO(ErdTable), lstShapes ); |
| 395 |
node = lstShapes.GetFirst(); |
| 396 |
while( node ) { |
| 397 |
ErdTable* tab = wxDynamicCast(node->GetData(),ErdTable); |
| 398 |
if (tab) { |
| 399 |
retStr.append(m_pDbAdapter->GetAlterTableConstraintSql(tab->GetTable())); |
| 400 |
} |
| 401 |
node = node->GetNext(); |
| 402 |
} |
| 403 |
return retStr; |
| 404 |
} |
| 405 |
|
| 406 |
wxSFShapeCanvas::PRECONNECTIONFINISHEDSTATE FrameCanvas::OnPreConnectionFinished(wxSFLineShape* connection) { |
| 407 |
wxSFTextShape* pText = wxDynamicCast(GetShapeUnderCursor(), wxSFTextShape); |
| 408 |
if (pText) { |
| 409 |
m_dstCol = pText->GetText().substr(3); |
| 410 |
} |
| 411 |
|
| 412 |
ErdTable *pSrcT = wxDynamicCast(GetDiagramManager()->GetItem(connection->GetSrcShapeId()),ErdTable); |
| 413 |
ErdTable *pTrgT = wxDynamicCast(GetDiagramManager()->GetItem(connection->GetTrgShapeId()),ErdTable); |
| 414 |
if( pSrcT && pTrgT ) { |
| 415 |
CreateForeignKey dlg(this, pSrcT, pTrgT, m_srcCol, m_dstCol); |
| 416 |
dlg.ShowModal(); |
| 417 |
} |
| 418 |
|
| 419 |
m_pParentPanel->SetToolMode(ErdPanel::modeDESIGN); |
| 420 |
|
| 421 |
return pfsFAILED_AND_CANCEL_LINE; |
| 422 |
} |
| 423 |
void FrameCanvas::OnPaste(const ShapeList& pasted) |
| 424 |
{ |
| 425 |
ShapeList::compatibility_iterator node = pasted.GetFirst(); |
| 426 |
while( node ) { |
| 427 |
ErdTable* tab = wxDynamicCast(node->GetData(), ErdTable); |
| 428 |
if (tab) m_pDbAdapter->ConvertTable(tab->GetTable()); |
| 429 |
node = node->GetNext(); |
| 430 |
} |
| 431 |
|
| 432 |
wxSFShapeCanvas::OnPaste(pasted); |
| 433 |
} |