• R/O
  • HTTP
  • SSH
  • HTTPS

Molby: コミット

Molecular Modeling Software


コミットメタ情報

リビジョンbcbabfaa5aaa694e63a636db4f300a53b35ee4d6 (tree)
日時2014-10-26 17:55:36
作者toshinagata1964 <toshinagata1964@a2be...>
コミッターtoshinagata1964

ログメッセージ

Molecule#display was not working.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@582 a2be9bc6-48de-4e38-9406-05402d4bc13c

変更サマリ

差分

--- a/wxSources/MoleculeView.cpp
+++ b/wxSources/MoleculeView.cpp
@@ -1085,9 +1085,9 @@ void
10851085 MainViewCallback_display(MainView *mview)
10861086 {
10871087 if (mview != NULL && mview->ref != NULL) {
1088- wxWindow *canvas = ((MoleculeView *)(mview->ref))->canvas;
1089- canvas->Refresh();
1090- canvas->Update();
1088+ wxWindow *canvas = ((MoleculeView *)(mview->ref))->canvas;
1089+ canvas->Refresh();
1090+ canvas->Update();
10911091 }
10921092 }
10931093
--- a/wxSources/MyGLCanvas.cpp
+++ b/wxSources/MyGLCanvas.cpp
@@ -187,3 +187,15 @@ MyGLCanvas::OnEraseBackground(wxEraseEvent & WXUNUSED(event))
187187 {
188188 // Do nothing, to avoid flashing.
189189 }
190+
191+// Force updating
192+void
193+MyGLCanvas::Update()
194+{
195+ wxClientDC dc(this);
196+ context->SetCurrent(*this);
197+ if (view) {
198+ view->OnDraw(&dc);
199+ SwapBuffers();
200+ }
201+}
--- a/wxSources/MyGLCanvas.h
+++ b/wxSources/MyGLCanvas.h
@@ -38,6 +38,7 @@ public:
3838 void OnSize(wxSizeEvent &event);
3939 void OnChar(wxKeyEvent &event);
4040 void OnCaptureLost(wxMouseCaptureLostEvent &event);
41+ void Update();
4142
4243 private:
4344 DECLARE_EVENT_TABLE()
旧リポジトリブラウザで表示